package javabean;

import java.nio.charset.StandardCharsets;

public class Test1 {
    public static void main(String[] args) {
        //1、无参数构造器创建对象封装一个用户信息
        User u1 = new User();
        u1.setName("chen");
        u1.setHeight(158.5);
        u1.setSalary(1100.0);
        System.out.println(u1.getName());
        System.out.println(u1.getHeight());
        System.out.println(u1.getSalary());
        System.out.println("---------------------");

        //2、有参数构造器创建对象封装一个用户信息
        User u2 = new User("li",158,1200);
        System.out.println(u2.getName());
        System.out.println(u2.getHeight());
        System.out.println(u2.getSalary());
    }
}
